package com.dstz.bpm.api.constant;

public enum TaskType {
   NORMAL("NORMAL", "普通任务"),
   SIGN("SIGN", "会签任务"),
   SIGN_SOURCE("SIGN_SOURCE", "会签任务_源"),
   ADD_SIGN("ADD_SIGN", "加签任务"),
   SUBFLOW("SUBFLOW", "子流程任务"),
   AGENT("AGENT", "代理任务"),
   DELIVERTO("DELIVERTO", "转办任务"),
   TRANSFORMING("TRANSFORMING", "事项任务");

   private String key = "";
   private String value = "";

   private TaskType(String key, String value) {
      this.key = key;
      this.value = value;
   }

   public String getKey() {
      return this.key;
   }

   public void setKey(String key) {
      this.key = key;
   }

   public String getValue() {
      return this.value;
   }

   public void setValue(String value) {
      this.value = value;
   }

   public String toString() {
      return this.key;
   }

   public boolean equalsWithKey(String key) {
      return this.key.equals(key);
   }

   public static TaskType fromKey(String key) {
      TaskType[] var1 = values();
      int var2 = var1.length;

      for(int var3 = 0; var3 < var2; ++var3) {
         TaskType c = var1[var3];
         if (c.getKey().equalsIgnoreCase(key)) {
            return c;
         }
      }

      throw new IllegalArgumentException(key);
   }
}
